[#10862] improvement(ci): Pre-install JDK 24 to stabilize Trino connector build#10863
Open
diqiu50 wants to merge 4 commits intoapache:mainfrom
Open
[#10862] improvement(ci): Pre-install JDK 24 to stabilize Trino connector build#10863diqiu50 wants to merge 4 commits intoapache:mainfrom
diqiu50 wants to merge 4 commits intoapache:mainfrom
Conversation
…or build in CI Create a reusable composite action that installs JDK 24 alongside JDK 17 and registers JDK 24 with Gradle toolchain via gradle.properties, eliminating unreliable Foojay downloads. Add skipTrinoConnector property to exclude Trino subprojects from the build in workflows that do not need them.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to stabilize CI builds for Trino connector modules by pre-installing JDK 24 (avoiding flaky Foojay toolchain downloads) and adding a Gradle flag to optionally exclude all Trino connector subprojects when they aren’t needed.
Changes:
- Added a reusable composite GitHub Action to install JDK 24 + primary JDK and register JDK 24 with Gradle toolchains.
- Updated multiple CI workflows that build/test Trino connectors to use the composite action instead of inline
actions/setup-java. - Added
-PskipTrinoConnectorsupport insettings.gradle.ktsand used it in the gvfs-fuse workflow to skip Trino modules.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
settings.gradle.kts |
Adds skipTrinoConnector property gate to exclude Trino subprojects from the Gradle project graph. |
.github/actions/setup-java-toolchains/action.yml |
New composite action to install JDK 24 + primary JDK and register JDK 24 path for Gradle toolchains. |
.github/workflows/build.yml |
Switches relevant jobs to use the new composite Java toolchain setup. |
.github/workflows/trino-integration-test.yml |
Uses composite action to ensure JDK 24 is present for Trino integration tests. |
.github/workflows/trino-multi-version-test.yml |
Uses composite action so multi-version Trino tests don’t rely on Foojay downloads. |
.github/workflows/frontend-integration-test.yml |
Uses composite action to stabilize the Trino connector build step (compileTrinoConnector). |
.github/workflows/cron-integration-test.yml |
Uses composite action so scheduled integration tests don’t rely on runtime JDK downloads. |
.github/workflows/gvfs-fuse-build-test.yml |
Adds -PskipTrinoConnector=true to one Gradle invocation to avoid including Trino modules. |
… consistent skipTrinoConnector
yuqi1129
reviewed
Apr 24, 2026
| "trino-connector:trino-connector-473-478", | ||
| "trino-connector:integration-test" | ||
| ) | ||
| if (gradle.startParameter.projectProperties["skipTrinoConnector"]?.toBoolean() != true) { |
Contributor
There was a problem hiding this comment.
What's the default value of it?
Contributor
There was a problem hiding this comment.
Do we need to set this to true in the backend CI pipeline?
Code Coverage Report
|
yuqi1129
reviewed
Apr 24, 2026
| printf ' %q' "${gradle_args[@]}" | ||
| printf '\n' | ||
|
|
||
| ./gradlew "${gradle_args[@]}" |
Contributor
There was a problem hiding this comment.
Do you need to add -PskipTrinoConnector=true here?
yuqi1129
reviewed
Apr 24, 2026
yuqi1129
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
.github/actions/setup-java-toolchainsthat pre-installs JDK 24 alongside JDK 17 and registers JDK 24 with Gradle toolchain via~/.gradle/gradle.properties, eliminating unreliable Foojay downloads at build time.build.yml,trino-integration-test.yml,trino-multi-version-test.yml,frontend-integration-test.yml,cron-integration-test.yml.skipTrinoConnectorproperty tosettings.gradle.ktsto conditionally exclude all Trino subprojects from the Gradle project graph. Use it ingvfs-fuse-build-test.ymlwhich has no Trino dependency.Why are the changes needed?
Fix: #10862
Trino connector submodules require Java 24 via Gradle toolchain. When only JDK 17 is installed in CI, Gradle auto-downloads JDK 24 via the Foojay resolver plugin, which is unreliable and causes flaky CI failures.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
CI workflows validation.